<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="UTF-8" import="com.wrsr.examsys.domain.Teacher"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path;
%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>资源管理</title>
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="jquery-easyui-1.4/jquery.min.js"></script>
<style type="text/css">
table {
	width: 100%;
}

td {
	width: 30%;
	text-align: center;
}
</style>
</head>
<body>

	<div class="content-top">
		<div class="wrap">
			<div class="section group">
				<div class="col span_2_of_contact">
					<div class="contact-form">
						<form method="post" action="seacherRresouce" id="seacherResouce">

							<div>
								<span><input name="seacherValue" type="text"
									autocomplete="off" placeholder="请输入您想要查询的课件名称"></span>
							</div>

							<div>
								<span> <input type="submit" value="搜素" />
								</span>
							</div>
						</form>
					</div>
					<div class="middle-content">
						<h1>
							资源列表<br>
						</h1>
					</div>
					<div class="contact-form">
						<table>
							<tr>
								<th><span>课程名</span></th>
								<th><span>文件名</span></th>
								<th><span>操作</span></th>
							</tr>
							<s:iterator value="resList" var="souce">
								<tr>
									<td><span>${souce.subject}</span></td>
									<td><span>${souce.resouceName }</span></td>
									<td>
										<%
											Teacher teacher = (Teacher) request.getSession().getAttribute(
														"teacher");

												if (teacher != null) {
										%> <a href="deleteResouce?resouceId=${souce.resouceId}">删除</a>| <%
 	}
 %> <s:if test='%{#souce.type=="1"}'>
											<a href="pptShow?resouceId=${souce.resouceId}">在线预览</a>|
										</s:if><a href="download?fileName=${souce.path }">下载</a>
									</td>
								</tr>
							</s:iterator>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div style="height: 150px;"></div>
</body>
</html>